{extend name="admin/public:layout" /}
{block name="title"}会议企业管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 会议企业管理</a></li>
                <li class="active">编辑会议企业</li>
            </ol>
        </div>
        <div class="ibox-content form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label Validform_label">会议名称</label>
                <div class="col-sm-4">
                    <input type="text" class="form-control" value="{$meetingName}" readonly/>
                    <input type="hidden" class="form-control" value="{$meetingId}" id="meetingId"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label Validform_label">企业列表</label>
                <div class="col-sm-4">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th width="50">#</th>
                            <th>企业名称</th>
                            <th>企业验证码</th>
                            <th width="180">操作</th>
                        </tr>
                        </thead>
                        <tbody id="com">
                        {volist name="comList" id="vo"}
                        <tr>
                            <td>{$vo.company_id}</td>
                            <td>{$vo.company_name}</td>
                            <td>{$vo.company_code}</td>
                            <td>
                                <a href="javascript:;" onclick="delcom(this);" data-params="{$vo.company_id}">删除</a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    })
    function delcom(obj){
        var meeting_id = $('#meetingId').val();
        var company_id = $(obj).data('params');
        $.post('{:url("del")}',{company_id: company_id,meeting_id: meeting_id},function(res){
            if(res.code == 1){
                $(obj).closest('tr').remove();
            }
        });
    }
</script>
{/block}